package com.light.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.light.common.base.BaseService;
import com.light.common.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.light.common.mybatisplus.MybatisPlusHelper;

import java.io.Serializable;
import java.util.List;

import com.light.sys.query.SysConfigQuery;
import com.light.sys.mapper.SysConfigMapper;
import com.light.sys.domain.SysConfigDO;
import com.light.sys.service.SysConfigService;


@Service
public class SysConfigServiceImpl extends BaseServiceImpl<SysConfigDO, SysConfigMapper> implements SysConfigService {

    @Autowired
    private SysConfigMapper sysConfigMapper;

    @Override
    public List<SysConfigDO> data(SysConfigQuery sysConfigQuery) {
        QueryWrapper<SysConfigDO> queryWrapper = MybatisPlusHelper.setQueryWrapperPageParam(sysConfigQuery.createQueryWrapper(), sysConfigQuery);
        return sysConfigMapper.selectList(queryWrapper);
    }

    @Override
    public int count(SysConfigQuery sysConfigQuery) {
        return sysConfigMapper.selectCount(sysConfigQuery.createQueryWrapper());
    }

}
